package java111;

import java.util.Scanner;

public class Day10 {
    // https://leetcode.cn/problems/longest-palindromic-substring/description/
    public int getLongestPalindrome(String A) {
        // write code here
        int res = 1;
        for (int i = 0; i < A.length(); i++) {
            for (int j = i + 1; j < A.length(); j++) {
                String tmp = A.substring(i, j + 1);
                if (isRes(tmp)) {
                    res = Math.max(res, tmp.length());
                }
            }
        }
        return res;
    }

    public static boolean isRes(String tmp) {
        StringBuilder sb = new StringBuilder(tmp);
        return tmp.contentEquals(sb.reverse());
    }


    // https://www.nowcoder.com/practice/cc1a9bc523a24716a117b438a1dc5706
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int m = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            long[][] dp = new long[n + 2][m + 2];
            // dp[i][j]表示从[0][0]位置出发，到达[i][j]位置，一共有多少走法
            dp[0][1] = 1;
            for (int i = 1; i <= n + 1; i++) {
                for (int j = 1; j <= m + 1; j++) {
                    if (isControl(i-1, j-1, x, y)) {
                        dp[i][j] = 0;
                    } else {
                        dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
                    }
                }
            }
            System.out.println(dp[n + 1][m + 1]);
        }
    }

    public static boolean isControl(int x1, int y1, int x, int y) {
        if (x == x1 && y == y1) {
            return true;
        }
        if (Math.abs(x1 - x) + Math.abs(y1 - y) == 3 && x != x1 && y != y1) {
            return true;
        }
        return false;
    }
}
